// To parse this JSON data, do
//
//     final userSettingModel = userSettingModelFromJson(jsonString);

import 'dart:convert';

UserSettingModel userSettingModelFromJson(String str) =>
    UserSettingModel.fromJson(json.decode(str));

String userSettingModelToJson(UserSettingModel data) =>
    json.encode(data.toJson());

class UserSettingModel {
  UserSettingModel({
    this.id,
    this.userId,
    this.isShowSchool,
    this.isShowCity,
    this.isShowTopic,
    this.isShowBirthday,
    this.isShowMoment,
    this.isShowFriend,
    this.isShowGender,
    this.isShowLiked,
    this.isShowCollected,
    this.artistId,
    this.createTime,
    this.updateTime,
  });

  int id;
  dynamic userId;
  int isShowSchool;
  int isShowCity;
  int isShowTopic;
  int isShowBirthday;
  int isShowGender;
  int isShowLiked;
  int isShowCollected;
  int isShowMoment;
  int isShowFriend;
  int artistId;
  DateTime createTime;
  DateTime updateTime;

  factory UserSettingModel.fromJson(Map<String, dynamic> json) =>
      UserSettingModel(
        id: json["id"],
        userId: json["userId"],
        isShowSchool: json["isShowSchool"],
        isShowCity: json["isShowCity"],
        isShowTopic: json["isShowTopic"],
        isShowBirthday: json["isShowBirthday"],
        isShowGender: json["isShowGender"],
        isShowLiked: json["isShowLiked"],
        isShowCollected: json["isShowCollected"],
        isShowMoment: json["isShowMoment"],
        isShowFriend: json["isShowFriend"],
        artistId: json["artistId"],
        createTime: DateTime.parse(json["createTime"]),
        updateTime: DateTime.parse(json["updateTime"]),
      );

  Map<String, dynamic> toJson() => {
        "id": id,
        "userId": userId,
        "isShowSchool": isShowSchool,
        "isShowCity": isShowCity,
        "isShowTopic": isShowTopic,
        "isShowBirthday": isShowBirthday,
        "isShowGender": isShowGender,
        "isShowLiked": isShowLiked,
        "isShowCollected": isShowCollected,
        "isShowMoment": isShowMoment,
        "isShowFriend": isShowFriend,
        "artistId": artistId,
        "createTime": createTime.toIso8601String(),
        "updateTime": updateTime.toIso8601String(),
      };
}
